import request from '@/config/axios'

export interface CouponSiteVO {
  id: number
  sitename: string
  managerName: string
  managerMobile: string
  customerName: string
  customerMobile: string
}

// 查询银行网点列表
export const getCouponSitePage = async (params) => {
  return await request.get({ url: `/bank/coupon-site/page`, params })
}

// 查询银行网点详情
export const getCouponSite = async (id: number) => {
  return await request.get({ url: `/bank/coupon-site/get?id=` + id })
}

// 新增银行网点
export const createCouponSite = async (data: CouponSiteVO) => {
  return await request.post({ url: `/bank/coupon-site/create`, data })
}

// 修改银行网点
export const updateCouponSite = async (data: CouponSiteVO) => {
  return await request.put({ url: `/bank/coupon-site/update`, data })
}

// 删除银行网点
export const deleteCouponSite = async (id: number) => {
  return await request.delete({ url: `/bank/coupon-site/delete?id=` + id })
}

// 导出银行网点 Excel
export const exportCouponSite = async (params) => {
  return await request.download({ url: `/bank/coupon-site/export-excel`, params })
}
